-- GENERATED SPELL FOR [Apoko] --


function spell0_24553(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_24553', 599, 1)
end

function spell1_24553(pUnit, Event) --@Earthbind Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(15786,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_24553', 1, 1)
end

function spell2_24553(pUnit, Event) --@Fire Nova Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(44257,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_24553', 1, 1)
end

function spell3_24553(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(21401,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24553', 8286, 1)
end

function spell4_24553(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(46180,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24553', 8300, 1)
end

function spell5_24553(pUnit, Event) --@Lesser Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(44256,pUnit)
pUnit:RegisterEvent('Sorts_24553', 1500, 1)
end

function spell6_24553(pUnit, Event) --@Lesser Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(46181,pUnit)
pUnit:RegisterEvent('Sorts_24553', 1500, 1)
end

function spell7_24553(pUnit, Event) --@Medallion of Immunity,Self--
pUnit:FullCastSpellOnTarget(46227,pUnit)
pUnit:RegisterEvent('Sorts_24553', 299, 1)
end

function spell8_24553(pUnit, Event) --@Purge,n/a--
pUnit:FullCastSpellOnTarget(27626,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24553', 580, 1)
end

function spell9_24553(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(46026,pUnit)
pUnit:RegisterEvent('Sorts_24553', 2500, 1)
end

function spell10_24553(pUnit, Event) --@Windfury Totem,Self--
pUnit:FullCastSpellOnTarget(27621,pUnit)
pUnit:RegisterEvent('Sorts_24553', 605, 1)
end

function Sorts_24553(pUnit, Event)
local choix_sorts_24553 = math.random(0, 10)
if choix_sorts_24553 == 0 then
pUnit:RegisterEvent('spell0_24553', 1, 1)
end
if choix_sorts_24553 == 1 then
pUnit:RegisterEvent('spell1_24553', 1, 1)
end
if choix_sorts_24553 == 2 then
pUnit:RegisterEvent('spell2_24553', 1, 1)
end
if choix_sorts_24553 == 3 then
pUnit:RegisterEvent('spell3_24553', 1, 1)
end
if choix_sorts_24553 == 4 then
pUnit:RegisterEvent('spell4_24553', 1, 1)
end
if choix_sorts_24553 == 5 then
pUnit:RegisterEvent('spell5_24553', 1, 1)
end
if choix_sorts_24553 == 6 then
pUnit:RegisterEvent('spell6_24553', 1, 1)
end
if choix_sorts_24553 == 7 then
pUnit:RegisterEvent('spell7_24553', 1, 1)
end
if choix_sorts_24553 == 8 then
pUnit:RegisterEvent('spell8_24553', 1, 1)
end
if choix_sorts_24553 == 9 then
pUnit:RegisterEvent('spell9_24553', 1, 1)
end
if choix_sorts_24553 == 10 then
pUnit:RegisterEvent('spell10_24553', 1, 1)
end
end

function mob24553_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24553', math.random(1500, 3000), 1)
end

function mob24553_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24553_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24553_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24553, 1, 'mob24553_Action')
RegisterUnitEvent(24553, 2, 'mob24553_Leave')
RegisterUnitEvent(24553, 3, 'mob24553_Kill')
RegisterUnitEvent(24553, 4, 'mob24553_Die')
